import Layout from '@/layout';
const User = {
  template: '<div>  <router-view></router-view></div>'
};
export const PRouter = [
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: () => import('@/views/redirect/index.vue')
      }
    ]
  },
  {
    path: '/kb',
    component: () => import('@/views/teachingDevice/KB/index.vue'),
    hidden: true
  },
  {
    path: '/searchPage',
    component: () => import('@/views/teacingVideo/searchPage/index.vue'),
    hidden: true
  },
  {
    path: '/videoDetail',
    component: () => import('@/views/teacingVideo/searchPage/VideoDetail.vue'),
    hidden: true
  },
  {
    path: '/login',
    component: () => import('@/views/login'),
    hidden: true
  },
  {
    path: '/register',
    component: () => import('@/views/register'),
    hidden: true
  },
  {
    path: '/:pathMatch(.*)*',
    component: () => import('@/views/error/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/error/401'),
    hidden: true
  },

  {
    path: '/user',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'profile',
        component: () => import('@/views/system/User/profile/index'),
        name: 'Profile',
        meta: { title: '个人中心', icon: 'user', keepAlive: false }
      }
    ]
  },

  {
    path: '',
    component: Layout,
    redirect: '/index',
    children: [
      {
        path: '/index',
        component: () => import('@/views/index'),
        name: 'MainIndex',
        alwaysShow: false,
        meta: {
          title: '首页',
          icon: 'index',
          keepAlive: false,
          breadcrumb: false
        }
      },
      {
        path: '/ExecutionPlanItem',
        hidden: true,
        component: () => import('@/views/sixManage/ExecutionPlan/itemList'),
        name: 'ExecutionPlanItem',
        meta: {
          title: '6S执行项',
          icon: 'user',
          keepAlive: false,
          activeMenu: '/sixManage/ExecutionPlan'
        }
      },
      {
        path: '/TeachMaintainPalnItem',
        hidden: true,
        component: () =>
          import('@/views/teachingDevice/TeachMaintainPaln/itemList'),
        name: 'TeachMaintainPalnItem',
        meta: {
          title: '保养项',
          icon: 'user',
          keepAlive: false,
          activeMenu: '/teachingDevice/TeachMaintainPaln'
        }
      },
      {
        path: '/OfficeInspectPlanItem',
        hidden: true,
        component: () =>
          import('@/views/teachingDevice/TeachMaintainPaln/itemList'),
        name: 'OfficeInspectPlanItem',
        meta: {
          title: '检验项',
          icon: 'user',
          keepAlive: false,
          activeMenu: '/officeDevice/OfficeInspectPlan'
        }
      }
    ]
  }
];

export default { PRouter };
